// JavaScript Document
function show(object) {
//alert('show: ' + object)
    if (document.layers && document.layers[object]){
        document.layers[object].visibility = 'visible';
    } else if (document.all) {
        document.all[object].style.visibility = 'visible';
    } else {
		document.getElementById(object).style.visibility = 'visible';
	}
}

function hide(object) {
//alert('hide: ' + object)
    if (document.layers && document.layers[object]){
        document.layers[object].visibility = 'hidden';
    } else if (document.all) {
        document.all[object].style.visibility = 'hidden';
	} else {
		document.getElementById(object).style.visibility = 'hidden';
	}
}

function maximizeWin() {
 if (window.screen) {
  var aw = screen.availWidth;
  var ah = screen.availHeight;
  window.moveTo(0, 0);
  window.resizeTo(aw, ah);
 }
}

var navigationImage = new Array(); 

var imageUrl = '/image'

function getImageObj(){
	navigationImage[0] = new Image()
	navigationImage[0].src = '../image/000/nav/nav_on.gif'

	navigationImage[1] = new Image()
	navigationImage[1].src = '../image/000/nav/nav.gif'
	
	navigationImage[2] = new Image()
	navigationImage[2].src = '../image/000/nav/nav_go.gif'
	
	navigationImage[5] = new Image()
	navigationImage[5].src = '../image/000/nav/picnexton2.gif'
	
	navigationImage[6] = new Image()
	navigationImage[6].src = '../image/000/nav/picclose.gif'
	
	navigationImage[7] = new Image()
	navigationImage[7].src = '../image/000/nav/picbackon2.gif'
	
	navigationImage[8] = new Image()
	navigationImage[8].src = '../image/000/nav/continue2.gif'
	
}

var orgImage
var orgImage2

function swapImage(){
	var args = swapImage.arguments
	imageObj = args[0]
	swapObj = args[1]
	orgImage = imageObj.src
	imageObj.src = swapObj.src
}

function restoreImage(){
	var args = restoreImage.arguments
	imageObj = args[0]
	imageObj.src = orgImage
}

function swapImage2(){
	var args = swapImage2.arguments
	imageObj = args[0]
	swapObj = args[1]
	orgImage2 = imageObj.src
	imageObj.src = swapObj.src
}

function restoreImage2(){
	var args = restoreImage2.arguments
	imageObj = args[0]
	imageObj.src = orgImage2
}

var headImgOrg
var chestImgOrg
var midbodyImgOrg
var legImgOrg

function swapBodyHead(){
	document.images['headImg'].src = '../image/body/headon_' + sex + '.gif';
	document.images['chestImg'].src = '../image/body/chest_' + sex + '.gif';
	document.images['midbodyImg'].src = '../image/body/midbody_' + sex + '.gif';
	document.images['legImg'].src = '../image/body/leg_' + sex + '.gif';
	

	 show('head');
	 hide('breast');
	 hide('abs');
	 hide('leg');
	 hide('welcome');

}

function swapBodyChest(){
	document.images['headImg'].src = '../image/body/head_' + sex + '.gif';
	document.images['chestImg'].src = '../image/body/cheston_' + sex + '.gif';
	document.images['midbodyImg'].src = '../image/body/cheston2_' + sex + '.gif';
	document.images['legImg'].src = '../image/body/leg_' + sex + '.gif';
	

	show('breast');
	hide('head');
	hide('abs');
	hide('leg');
	hide('welcome');

	
}

function swapBodyMid(){	
	document.images['headImg'].src = '../image/body/midbodyon3_' + sex + '.gif';
	document.images['chestImg'].src = '../image/body/midbodyon2_' + sex + '.gif';
	document.images['midbodyImg'].src = '../image/body/midbodyon_' + sex + '.gif';
	document.images['legImg'].src = '../image/body/leg_' + sex + '.gif';
	

	show('abs'); 
	hide('head'); 
	hide('breast');
	hide('leg'); 
	hide('welcome');

}

function swapBodyLeg(){
	document.images['headImg'].src = '../image/body/head_' + sex + '.gif';
	document.images['chestImg'].src = '../image/body/chest_' + sex + '.gif';
	document.images['midbodyImg'].src = '../image/body/midbody_' + sex + '.gif';
	document.images['legImg'].src = '../image/body/legon_' + sex + '.gif';
	

	show('leg'); 
	hide('head');
	hide('breast');
	hide('abs');
	hide('welcome');


}

var sex = "m";
if((sexId == "shemale") || (sexId == "male")){
	sex = "m"
} else {
	sex = "f"
}

function getBodyImageObj(){


}

function getNavImageObj(){
	genNavImage[0] = new Image()
	genNavImage[0].src = '../image/336/336_s.gif';
	
	genNavImage[1] = new Image()
	genNavImage[1].src = '../image/337/337_s.gif';
	
	genNavImage[2] = new Image()
	genNavImage[2].src = '../image/338/338_s.gif';
	
	genNavImage[3] = new Image()
	genNavImage[3].src = '../image/000/dot3_r.gif';
	
	genNavImage[4] = new Image()
	genNavImage[4].src = '../image/000/dot3.gif';
}


